﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Oroboros;
using Oroboros.Objects;
using Oroboros.Save_Data;

namespace Save_Editor.Windows
{
    /// <summary>
    /// Interaction logic for winHumanSaveData.xaml
    /// </summary>
    public partial class winHumanSaveData : Window
    {
        public winHumanSaveData()
        {
            InitializeComponent();

            string[] models = new string[] {
                @"Characters\MainCharacters\Anna_Paramedic\Anna Paramedic",
                @"Characters\MainCharacters\Ben Riley\Ben_Riley_Default",
                @"Characters\MainCharacters\Charlene\female_character01",
                @"Characters\MainCharacters\Cindy\Cindy_Bou",
                @"Characters\MainCharacters\Cindy\Cindy_lou",
                @"Characters\MainCharacters\Cindy\Cindy_Rou",
                @"Characters\MainCharacters\Cindy\Cindy_Too_Too",
                @"Characters\MainCharacters\Ed Smegly\ed_smegly_Default",
                @"Characters\MainCharacters\Ed Smegly\ed_smegly_kerb",
                @"Characters\MainCharacters\Ed Smegly\wyatt",
                @"Characters\MainCharacters\GaryOldman\gary_oldman",
                @"Characters\MainCharacters\GaryOldman\middleaged_man_01",
                @"Characters\MainCharacters\GaryOldman\middleaged_man_02",
                @"Characters\MainCharacters\Hoodie Girls\BlueEyed_PurpleVampStar",
                @"Characters\MainCharacters\Hoodie Girls\BlueEyed_RedStripe",
                @"Characters\MainCharacters\Hoodie Girls\BrownEyed_BlackHeart",
                @"Characters\MainCharacters\Hoodie Girls\BrownEyed_GreenStripe",
                @"Characters\MainCharacters\Hoodie Girls\BrownEyed_PurpleBunny",
                @"Characters\MainCharacters\Hoodie Girls\BrownEyed_WhiteCheckerDoll",
                @"Characters\MainCharacters\Hoodie Girls\GreenEyed_RedHeart",
                @"Characters\MainCharacters\Hoodie Girls\GreenEyed_VampStar",
                @"Characters\MainCharacters\Hunter Smith\Hunter_Smith",
                @"Characters\MainCharacters\Johnny_C\Johnny_C",
                @"Characters\MainCharacters\Loser_Rapper\loser_rapper",
                @"Characters\MainCharacters\OiOi_Punk\OiOi_Punk_default",
                @"Characters\MainCharacters\OiOi_Punk\OiOi_Punk_Vest",
                @"Characters\MainCharacters\OiOi_Punk\OiOi_Punk_default",
                @"Characters\MainCharacters\OiOi_Punk\OiOi_Punk_default",
                @"Characters\MainCharacters\Old Lady Mae\Old_Lady_Mae",
                @"Characters\MainCharacters\Old Lady Mae\Old_Lady_Mae_Bee",
                @"Characters\MainCharacters\Old Lady Mae\Old_Lady_Mae_Chee",
                @"Characters\MainCharacters\Old Lady Mae\Old_Lady_Mae_Lee",
                @"Characters\MainCharacters\Preacher\preacher",
                @"Characters\MainCharacters\Scientist Lady\scientist",
                @"Characters\MainCharacters\Seer\seer",
                @"Characters\MainCharacters\Shane Lazarus\shane",
                @"Characters\MainCharacters\Teacher\middleaged_woman_01",
                @"Characters\MainCharacters\Teacher\middleaged_woman_02",
                @"Characters\MainCharacters\Teacher\middleaged_woman_03",
                @"Characters\MainCharacters\Teacher\teacher",
                @"Characters\MainCharacters\Unkie Ben\UnkieBen_BeigeShirt",
                @"Characters\MainCharacters\Unkie Ben\UnkieBen_BlackVest",
                @"Characters\MainCharacters\Unkie Ben\UnkieBen_BlueShirt",
                @"Characters\MainCharacters\Unkie Ben\UnkieBen_GreenSweater",
                @"Characters\MainCharacters\Unkie Ben\UnkieBen_GreenVest",
                @"Characters\MainCharacters\Unkie Ben\UnkieBen_GreyShirt",
                @"Characters\MainCharacters\Unkie Ben\UnkieBen_PlaidSweater",
                @"Characters\MainCharacters\Veteran\veteran",
                @"Characters\MainCharacters\witch\witch",
                @"Characters\MainCharacters\Zoe\Zoe_default",
                @"Characters\Children\Child_Female\child_female",
                @"Characters\Children\Child_Female\child_female02",
                @"Characters\Children\Child_Female\child_female03",
                @"Characters\Children\Child_Female\child_female04",
                @"Characters\Children\Child_Female\child_female05",
                @"Characters\Children\Child_Male\child_male",
                @"Characters\Children\Child_Male\child_male_02",
                @"Characters\Children\Child_Male\child_male_03",
                @"Characters\Children\Child_Male\child_male_04",
                @"Characters\Children\Child_Male\child_male_05"
            };

            comboBox1.ItemsSource = models;
        }

        public winHealthData myHealth;
        private void humanHealthWin(object sender, RoutedEventArgs e)
        {
            if (myHealth == null)
            {
                myHealth = new winHealthData();
                myHealth.Closed += new EventHandler(winHealth_Closed);
            }
            myHealth.Human = (HumanSaveData)this.DataContext;
            myHealth.Owner = this;
            myHealth.ShowDialog();
        }

        void winHealth_Closed(object sender, EventArgs e)
        {
            myHealth = null;
        }

        private void humanOK(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        public winStatsData myStats;
        private void humanStatsWin(object sender, RoutedEventArgs e)
        {
            if (myStats == null)
            {
                myStats = new winStatsData();
                myStats.Closed += new EventHandler(myStats_Closed);
            }
            myStats.Human = (HumanSaveData)this.DataContext;
            myStats.Owner = this;
            myStats.ShowDialog();
        }

        void myStats_Closed(object sender, EventArgs e)
        {
            myStats = null;
        }

        public winHumanInventory myItems;

        void myItems_Closed(object sender, EventArgs e)
        {
            myItems = null;
        }

        private void humanInvWin(object sender, RoutedEventArgs e)
        {
            if (myItems == null)
            {
                myItems = new winHumanInventory();
                myItems.Closed += new EventHandler(myItems_Closed);
            }
            myItems.Human = (HumanSaveData)this.DataContext;
            myItems.Owner = this;
            myItems.ShowDialog();
        }

        public winHumanBasePlacement myBase;
        private void humanBaseWin(object sender, RoutedEventArgs e)
        {
            if (myBase == null)
            {
                myBase = new winHumanBasePlacement();
                myBase.Closed += new EventHandler(myBase_Closed);
            }
            myBase.Human = (HumanSaveData)this.DataContext;
            myBase.Owner = this;
            myBase.ShowDialog();
        }

        void myBase_Closed(object sender, EventArgs e)
        {
            myBase = null;
        }

        public winSkillData mySkill;
        private void humanSkillWin(object sender, RoutedEventArgs e)
        {
            if (mySkill == null)
            {
                mySkill = new winSkillData();
                mySkill.Closed += new EventHandler(mySkill_Closed);
            }
            mySkill.Human = (HumanSaveData)this.DataContext;
            mySkill.Owner = this;
            mySkill.ShowDialog();
        }

        void mySkill_Closed(object sender, EventArgs e)
        {
            mySkill = null;
        }
    }

}